home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 001-025 / disk_008 / src / mklev.h < prev    next >
C/C++ Source or Header  |  1992-05-06  |  2KB  |  100 lines

  1. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1984. */
  2.  
  3. #include "config.h"
  4.  
  5. /* we are not BSD or system V */
  6. /* #ifdef BSD                   */
  7. /* #include <strings.h>      /* declarations for strcat etc. */
  8. /* #else                        */
  9. /* #include <string.h>      /* idem on System V */
  10. /* #define   index   strchr     */
  11. /* #define   rindex   strrchr   */
  12. /* #endif BSD                   */
  13.  
  14. #include   "def.objclass.h"
  15.  
  16. typedef struct {
  17.    xchar x,y;
  18. } coord;
  19.  
  20. #include   "def.monst.h"   /* uses coord */
  21. #include   "def.gen.h"
  22. #include   "def.obj.h"
  23.  
  24. extern char ismklev;
  25. extern char *sprintf();
  26.  
  27. #define   BUFSZ   256   /* for getlin buffers */
  28. #define   PL_NSIZ   32   /* name of player, ghost, shopkeeper */
  29.  
  30. #define   HWALL 1   /* Level location types */
  31. #define   VWALL 2
  32. #define   SDOOR 3
  33. #define   SCORR 4
  34. #define   LDOOR 5
  35. #define   DOOR 6   /* smallest accessible type */
  36. #define   CORR 7
  37. #define   ROOM 8
  38. #define   STAIRS 9
  39. #ifdef QUEST
  40. #define   CORR_SYM   ':'
  41. #else
  42. #define   CORR_SYM   '#'
  43. #endif QUEST
  44.  
  45. #define   ERRCHAR   '{'
  46.  
  47. #define TRAPNUM 9
  48.  
  49. struct rm {
  50.    char scrsym;
  51. /*   unsigned typ:5; */
  52. /*   unsigned new:1; */
  53. /*   unsigned seen:1;*/
  54. /*   unsigned lit:1; */
  55.    char typ;
  56.    char new;
  57.    char seen;
  58.    char lit;
  59. };
  60. extern struct rm levl[COLNO][ROWNO];
  61.  
  62. #ifndef QUEST
  63. struct mkroom {
  64.    xchar lx,hx,ly,hy;
  65.    schar rtype,rlit,doorct,fdoor;
  66. };
  67. #define   MAXNROFROOMS   15
  68. extern struct mkroom rooms[MAXNROFROOMS+1];
  69. #define   DOORMAX   100
  70. extern coord doors[DOORMAX];
  71. #endif QUEST
  72.  
  73.  
  74. #include   "def.permonst.h"
  75. extern struct permonst mons[];
  76. #define PM_ACIDBLOB    &mons[7]
  77. #define PM_PIERC    &mons[17]
  78. #define PM_MIMIC    &mons[37]
  79. #define PM_CHAM        &mons[47]
  80. #define PM_DEMON    &mons[54]
  81. #define PM_MINOTAUR    &mons[55]    /* last in mons array */
  82. #define PM_SHK        &mons[56]    /* very last */
  83. #define PM_GHOST    &mons[57]    /* for ghosts in saved files */
  84. #define PM_LI_DOG    &mons[58]    /* little dogs to be saved */
  85. #define PM_DOG        &mons[59]    /* medium sized dog */
  86. #define PM_LA_DOG    &mons[60]    /* large sized dog */
  87. #define PMONCOUNT    61        /* number of monsters total */
  88. #define CMNUM        55        /* number of common monsters */
  89.  
  90. extern long *alloc();
  91.  
  92. extern xchar xdnstair, ydnstair, xupstair, yupstair; /* stairs up and down */
  93.  
  94. extern xchar dlevel;
  95. #ifdef WIZARD
  96. extern boolean wizard;
  97. #endif WIZARD
  98. #define   newstring(x)   (char *) alloc((unsigned)(x))
  99.  
  100.